
package com.jf.cloud.common.product.dto;

import com.jf.cloud.common.product.vo.SpuDetailVO;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * spu信息DTO
 *
 * @author zz
 * @date 2020-10-28 15:27:24
 */
public class SpuDTO{
    private static final long serialVersionUID = 1L;

    @Schema(description = "spuId" )
    private Long spuId;

    @Schema(description = "品牌ID" )
    private Long brandId;

    @Schema(description = "分类ID" )
    private Long categoryId;

    @Schema(description = "店铺分类ID" )
    private Long shopCategoryId;

    @Schema(description = "店铺地址" )
    private String shopAddr;

    @NotNull(message = "商品国际化信息不能为空")
    @Schema(description = "店铺分类ID" )
    private List<SpuLangDTO> spuLangList;

    @Schema(description = "spu名称" )
    private String name;

    @Schema(description = "卖点" )
    private String sellingPoint;

    @NotNull(message = "商品轮播图不能为空")
    @Schema(description = "商品介绍主图 多个图片逗号分隔" )
    private String imgUrls;

    @NotNull(message = "商品主图不能为空")
    @Schema(description = "商品主图" )
    private String mainImgUrl;

    @Schema(description = "市场价" )
    private Long marketPriceFee;

    @NotNull(message = "售价不能为空")
    @Schema(description = "售价" )
    private Long priceFee;

    @Schema(description = "状态 -1:删除, 0:下架, 1:上架, 2:平台下架, 3: 等待审核" )
    private Integer status;

    @Schema(description = "商品属性值列表" )
    private List<SpuAttrValueDTO> spuAttrValues;

    @NotEmpty(message = "sku信息不能为空")
    @Schema(description = "商品规格列表" )
    private List<SkuDTO> skuList;

    @Schema(description = "商品详情" )
    private String detail;

    @Schema(description = "是否阶梯价")
    private Integer isBatch;

    @NotNull(message = "总库存不能为空")
    @Schema(description = "总库存" )
    private Integer totalStock;

    @NotNull(message = "配送方式不能为空")
    @Schema(description = "配送方式json见TransportModeVO" )
    private String deliveryMode;

    @Schema(description = "运费模板id" )
    private Long deliveryTemplateId;

    @Schema(description = "商品类型(0普通商品 1拼团 2秒杀 3积分)" )
    private Integer spuType;

    @Schema(description = "活动id(关联prod_type)" )
    private Long activityId;

    @Schema(description = "是否筛选掉活动商品" )
    private Integer isActive;

    @NotNull(message = "是否为组合商品0普通商品，1组合商品 不能为空")
    @Schema(description = "是否为组合商品0普通商品，1组合商品" )
    private Integer isCompose;

    @Schema(description = "商品类别 0.实物商品 1. 虚拟商品" )
    private Integer spuMold;

    @Schema(description = "是否可以退款 1.可以 0.不可以" )
    @Min(value = 0, message = "只能为0或1")
    @Max(value = 1, message = "只能为0或1")
    private Integer isRefund;

    @Schema(description = "虚拟商品的留言备注" )
    private String virtualRemark;

    @Schema(description = "预售状态 -1：未开启 0.全款预售 1.定金预售" )
    private Integer preSaleType;

    @Schema(description = "定金收取类型 0.按比例 1.按金额" )
    private Integer depositType;

    @Schema(description = "定金数值" )
    private BigDecimal depositValue;

    @Schema(description = "定金膨胀数值" )
    private BigDecimal depositExpansionValue;

    @Schema(description = "定金支付开始时间" )
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date depositStartTime;

    @Schema(description = "定金支付结束时间" )
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date depositEndTime;

    @Schema(description = "尾款支付开始时间" )
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date balanceStartTime;

    @Schema(description = "尾款支付结束时间" )
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date balanceEndTime;

    @Schema(description = "预售发货类型 0.固定时间  x.尾款支付后x天发货" )
    private Integer preSaleDeliveryType;

    @Schema(description = "预售发货时间" )
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date preSaleDeliveryTime;
    @Schema(description = "商品视频" )
    private String video;

    @Schema(description = "积分价格" )
    private Long scoreFee;

    @NotNull(message = "sku是否含有图片不能为空")
    @Schema(description = "sku是否含有图片 0无 1有" )
    private Integer hasSkuImg;

    @Schema(description = "分组id" )
    private Long tagId;

    @Schema(description = "序号" )
    private Integer seq;

    @Schema(description = "spuId列表(商品上下架：批量操作时，用此参数)(批量处理参数)" )
    private List<Long> spuIds;

    @Schema(description = "店铺id" )
    private Long shopId;

    @Schema(description = "spu编码" )
    private String spuCode;

    @Schema(description = "供应商商品类型 0.否 1.是 2.商家代销" )
    private Integer supplierSpuType;

    @Schema(description = "关联商品商品id，只有供应商商品为2才有" )
    private Long supplierSpuId;

    @Schema(description = "发货方式 1.供应商发货 2.仓库发货" )
    private Integer supplierDeliveryType;

    @Schema(description = "供应商id" )
    private Long supplierId;

    @Schema(description = "计量单位" )
    private String measureUnit;

    @Schema(description = "供应商分类id" )
    private Long supplierCategoryId;

    @Schema(description = "代销商品规格选择状态，1: 全选 2：部分选择" )
    private Integer skuChoiceStatus;

    @Schema(description = "供应商商品更新后代销商品是否已同步更新 1:已更新 -1:未更新" )
    private Integer isSynUpdate;

    @Schema(description = "代销商品名称是否已更改 0未更改，1已更改" )
    private Integer nameChange;

    @Schema(description = "代销图片是否已更改 0未更改，1已更改" )
    private Integer imageChange;

    @Schema(description = "代销商品卖点是否已更改, 0未更改，1已更改" )
    private Integer sellingPointChange;

    @Schema(description = "代销商品视频是否已更改, 0未更改，1已更改" )
    private Integer videoChange;

    @Schema(description = "代销商品计量单位是否已更改，0未更改，1已更改" )
    private Integer measureUnitChange;

    @Schema(description = "代销商品品牌是否已更改，0未更改，1已更改" )
    private Integer brandChange;

    @Schema(description = "代销商品详情是否已更改，0未更改，1已更改" )
    private Integer detailChange;

    @Schema(description = "代销商品SPU编码是否更改，0未更改，1已更改" )
    private Integer spuCodeChange;

    @Schema(description = "商品详情列表" )
    private List<SpuDetailVO> detailList;

    @Schema(description = "商品编码" )
    private String partyCode;

    @Schema(description = "商品来源,0商家,1供应商" )
    private Integer spuOrigin;

    @Schema(description = "核销次数 -1.多次核销 0.无需核销 1.单次核销" )
    @Min(value = -1, message = "只能为-1,0或1")
    @Max(value = 1, message = "只能为-1,0或1")
    private Integer writeOffNum;

    @Schema(description = "多次核销次数 -1.无限次" )
    private Integer writeOffMultipleCount;

    @Schema(description = "核销有效期 -1.长期有效 0.自定义  x.x天内有效" )
    @Max(value = 9999, message = "核销有效期应该小于{max}天")
    private Integer writeOffTime;

    @Schema(description = "核销开始时间" )
    private Date writeOffStart;

    @Schema(description = "核销结束时间" )
    private Date writeOffEnd;
    @Schema(description = "核销结束时间" )
    private List<RankDTO> rank;

    public List<RankDTO> getRank() {
        return rank;
    }

    public void setRank(List<RankDTO> rank) {
        this.rank = rank;
    }

    public String getShopAddr() {
        return shopAddr;
    }

    public void setShopAddr(String shopAddr) {
        this.shopAddr = shopAddr;
    }

    public Integer getWriteOffNum() {
        return writeOffNum;
    }

    public void setWriteOffNum(Integer writeOffNum) {
        this.writeOffNum = writeOffNum;
    }

    public Integer getWriteOffMultipleCount() {
        return writeOffMultipleCount;
    }

    public void setWriteOffMultipleCount(Integer writeOffMultipleCount) {
        this.writeOffMultipleCount = writeOffMultipleCount;
    }

    public Integer getWriteOffTime() {
        return writeOffTime;
    }

    public void setWriteOffTime(Integer writeOffTime) {
        this.writeOffTime = writeOffTime;
    }

    public Date getWriteOffStart() {
        return writeOffStart;
    }

    public void setWriteOffStart(Date writeOffStart) {
        this.writeOffStart = writeOffStart;
    }

    public Date getWriteOffEnd() {
        return writeOffEnd;
    }

    public void setWriteOffEnd(Date writeOffEnd) {
        this.writeOffEnd = writeOffEnd;
    }

    public Integer getSpuOrigin() {
        return spuOrigin;
    }

    public void setSpuOrigin(Integer spuOrigin) {
        this.spuOrigin = spuOrigin;
    }

    public Integer getIsActive() {
        return isActive;
    }

    public void setIsActive(Integer isActive) {
        this.isActive = isActive;
    }

    public Integer getSpuCodeChange() {
        return spuCodeChange;
    }

    public void setSpuCodeChange(Integer spuCodeChange) {
        this.spuCodeChange = spuCodeChange;
    }

    public Integer getNameChange() {
        return nameChange;
    }

    public void setNameChange(Integer nameChange) {
        this.nameChange = nameChange;
    }

    public Integer getImageChange() {
        return imageChange;
    }

    public void setImageChange(Integer imageChange) {
        this.imageChange = imageChange;
    }

    public Integer getSellingPointChange() {
        return sellingPointChange;
    }

    public void setSellingPointChange(Integer sellingPointChange) {
        this.sellingPointChange = sellingPointChange;
    }

    public Integer getVideoChange() {
        return videoChange;
    }

    public void setVideoChange(Integer videoChange) {
        this.videoChange = videoChange;
    }

    public Integer getMeasureUnitChange() {
        return measureUnitChange;
    }

    public void setMeasureUnitChange(Integer measureUnitChange) {
        this.measureUnitChange = measureUnitChange;
    }

    public Integer getBrandChange() {
        return brandChange;
    }

    public void setBrandChange(Integer brandChange) {
        this.brandChange = brandChange;
    }

    public Integer getDetailChange() {
        return detailChange;
    }

    public void setDetailChange(Integer detailChange) {
        this.detailChange = detailChange;
    }

    public List<SpuDetailVO> getDetailList() {
        return detailList;
    }

    public void setDetailList(List<SpuDetailVO> detailList) {
        this.detailList = detailList;
    }

    public Integer getIsSynUpdate() {
        return isSynUpdate;
    }

    public void setIsSynUpdate(Integer isSynUpdate) {
        this.isSynUpdate = isSynUpdate;
    }
    public Integer getSkuChoiceStatus() {
        return skuChoiceStatus;
    }

    public void setSkuChoiceStatus(Integer skuChoiceStatus) {
        this.skuChoiceStatus = skuChoiceStatus;
    }

    public String getMeasureUnit() {
        return measureUnit;
    }

    public void setMeasureUnit(String measureUnit) {
        this.measureUnit = measureUnit;
    }

    public Long getSupplierCategoryId() {
        return supplierCategoryId;
    }

    public void setSupplierCategoryId(Long supplierCategoryId) {
        this.supplierCategoryId = supplierCategoryId;
    }

    public Long getTagId() {
        return tagId;
    }

    public void setTagId(Long tagId) {
        this.tagId = tagId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Integer getPreSaleType() {
        return preSaleType;
    }

    public void setPreSaleType(Integer preSaleType) {
        this.preSaleType = preSaleType;
    }

    public Integer getDepositType() {
        return depositType;
    }

    public void setDepositType(Integer depositType) {
        this.depositType = depositType;
    }

    public BigDecimal getDepositValue() {
        return depositValue;
    }

    public void setDepositValue(BigDecimal depositValue) {
        this.depositValue = depositValue;
    }

    public BigDecimal getDepositExpansionValue() {
        return depositExpansionValue;
    }

    public void setDepositExpansionValue(BigDecimal depositExpansionValue) {
        this.depositExpansionValue = depositExpansionValue;
    }

    public Date getDepositStartTime() {
        return depositStartTime;
    }

    public void setDepositStartTime(Date depositStartTime) {
        this.depositStartTime = depositStartTime;
    }

    public Date getDepositEndTime() {
        return depositEndTime;
    }

    public void setDepositEndTime(Date depositEndTime) {
        this.depositEndTime = depositEndTime;
    }

    public Date getBalanceStartTime() {
        return balanceStartTime;
    }

    public void setBalanceStartTime(Date balanceStartTime) {
        this.balanceStartTime = balanceStartTime;
    }

    public Date getBalanceEndTime() {
        return balanceEndTime;
    }

    public void setBalanceEndTime(Date balanceEndTime) {
        this.balanceEndTime = balanceEndTime;
    }

    public Integer getPreSaleDeliveryType() {
        return preSaleDeliveryType;
    }

    public void setPreSaleDeliveryType(Integer preSaleDeliveryType) {
        this.preSaleDeliveryType = preSaleDeliveryType;
    }

    public Date getPreSaleDeliveryTime() {
        return preSaleDeliveryTime;
    }

    public void setPreSaleDeliveryTime(Date preSaleDeliveryTime) {
        this.preSaleDeliveryTime = preSaleDeliveryTime;
    }

    public String getVideo() {
        return video;
    }

    public void setVideo(String video) {
        this.video = video;
    }

    public Long getScoreFee() {
        return scoreFee;
    }

    public void setScoreFee(Long scoreFee) {
        this.scoreFee = scoreFee;
    }

    public List<SpuAttrValueDTO> getSpuAttrValues() {
        return spuAttrValues;
    }

    public void setSpuAttrValues(List<SpuAttrValueDTO> spuAttrValues) {
        this.spuAttrValues = spuAttrValues;
    }

    public List<SkuDTO> getSkuList() {
        return skuList;
    }

    public void setSkuList(List<SkuDTO> skuList) {
        this.skuList = skuList;
    }

    public Integer getTotalStock() {
        return totalStock;
    }

    public void setTotalStock(Integer totalStock) {
        this.totalStock = totalStock;
    }

    public String getSellingPoint() {
        return sellingPoint;
    }

    public void setSellingPoint(String sellingPoint) {
        this.sellingPoint = sellingPoint;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public Long getSpuId() {
        return spuId;
    }

    public void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Long getShopCategoryId() {
        return shopCategoryId;
    }

    public void setShopCategoryId(Long shopCategoryId) {
        this.shopCategoryId = shopCategoryId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImgUrls() {
        return imgUrls;
    }

    public void setImgUrls(String imgUrls) {
        this.imgUrls = imgUrls;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDeliveryMode() {
        return deliveryMode;
    }

    public void setDeliveryMode(String deliveryMode) {
        this.deliveryMode = deliveryMode;
    }

    public Long getDeliveryTemplateId() {
        return deliveryTemplateId;
    }

    public void setDeliveryTemplateId(Long deliveryTemplateId) {
        this.deliveryTemplateId = deliveryTemplateId;
    }

    public Integer getSpuType() {
        return spuType;
    }

    public void setSpuType(Integer spuType) {
        this.spuType = spuType;
    }

    public Integer getIsBatch() {
        return isBatch;
    }

    public void setIsBatch(Integer isBatch) {
        this.isBatch = isBatch;
    }

    public Long getActivityId() {
        return activityId;
    }

    public void setActivityId(Long activityId) {
        this.activityId = activityId;
    }

    public Integer getIsCompose() {
        return isCompose;
    }

    public void setIsCompose(Integer isCompose) {
        this.isCompose = isCompose;
    }

    public Integer getSpuMold() {
        return spuMold;
    }

    public void setSpuMold(Integer spuMold) {
        this.spuMold = spuMold;
    }

    public Integer getIsRefund() {
        return isRefund;
    }

    public void setIsRefund(Integer isRefund) {
        this.isRefund = isRefund;
    }

    public String getVirtualRemark() {
        return virtualRemark;
    }

    public void setVirtualRemark(String virtualRemark) {
        this.virtualRemark = virtualRemark;
    }

    public Long getMarketPriceFee() {
        return marketPriceFee;
    }

    public void setMarketPriceFee(Long marketPriceFee) {
        this.marketPriceFee = marketPriceFee;
    }

    public Long getPriceFee() {
        return priceFee;
    }

    public void setPriceFee(Long priceFee) {
        this.priceFee = priceFee;
    }

    public String getMainImgUrl() {
        return mainImgUrl;
    }

    public void setMainImgUrl(String mainImgUrl) {
        this.mainImgUrl = mainImgUrl;
    }

    public Integer getHasSkuImg() {
        return hasSkuImg;
    }

    public void setHasSkuImg(Integer hasSkuImg) {
        this.hasSkuImg = hasSkuImg;
    }

    public Integer getSeq() {
        return seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    public List<Long> getSpuIds() {
        return spuIds;
    }

    public void setSpuIds(List<Long> spuIds) {
        this.spuIds = spuIds;
    }

    public List<SpuLangDTO> getSpuLangList() {
        return spuLangList;
    }

    public void setSpuLangList(List<SpuLangDTO> spuLangList) {
        this.spuLangList = spuLangList;
    }

    public String getSpuCode() {
        return spuCode;
    }

    public void setSpuCode(String spuCode) {
        this.spuCode = spuCode;
    }

    public Integer getSupplierSpuType() {
        return supplierSpuType;
    }

    public void setSupplierSpuType(Integer supplierSpuType) {
        this.supplierSpuType = supplierSpuType;
    }

    public Long getSupplierSpuId() {
        return supplierSpuId;
    }

    public void setSupplierSpuId(Long supplierSpuId) {
        this.supplierSpuId = supplierSpuId;
    }

    public Integer getSupplierDeliveryType() {
        return supplierDeliveryType;
    }

    public void setSupplierDeliveryType(Integer supplierDeliveryType) {
        this.supplierDeliveryType = supplierDeliveryType;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public String getPartyCode() {
        return partyCode;
    }

    public void setPartyCode(String partyCode) {
        this.partyCode = partyCode;
    }

    @Override
    public String toString() {
        return "SpuDTO{" +
                "spuId=" + spuId +
                ", brandId=" + brandId +
                ", categoryId=" + categoryId +
                ", shopCategoryId=" + shopCategoryId +
                ", spuLangList=" + spuLangList +
                ", name='" + name + '\'' +
                ", sellingPoint='" + sellingPoint + '\'' +
                ", imgUrls='" + imgUrls + '\'' +
                ", mainImgUrl='" + mainImgUrl + '\'' +
                ", marketPriceFee=" + marketPriceFee +
                ", priceFee=" + priceFee +
                ", status=" + status +
                ", spuAttrValues=" + spuAttrValues +
                ", skuList=" + skuList +
                ", detail='" + detail + '\'' +
                ", totalStock=" + totalStock +
                ", deliveryMode='" + deliveryMode + '\'' +
                ", deliveryTemplateId=" + deliveryTemplateId +
                ", spuType=" + spuType +
                ", activityId=" + activityId +
                ", isActive=" + isActive +
                ", isCompose=" + isCompose +
                ", spuMold=" + spuMold +
                ", isRefund=" + isRefund +
                ", virtualRemark='" + virtualRemark + '\'' +
                ", preSaleType=" + preSaleType +
                ", depositType=" + depositType +
                ", depositValue=" + depositValue +
                ", depositExpansionValue=" + depositExpansionValue +
                ", depositStartTime=" + depositStartTime +
                ", depositEndTime=" + depositEndTime +
                ", balanceStartTime=" + balanceStartTime +
                ", balanceEndTime=" + balanceEndTime +
                ", preSaleDeliveryType=" + preSaleDeliveryType +
                ", preSaleDeliveryTime=" + preSaleDeliveryTime +
                ", video='" + video + '\'' +
                ", scoreFee=" + scoreFee +
                ", hasSkuImg=" + hasSkuImg +
                ", tagId=" + tagId +
                ", seq=" + seq +
                ", spuIds=" + spuIds +
                ", shopId=" + shopId +
                ", spuCode='" + spuCode + '\'' +
                ", supplierSpuType=" + supplierSpuType +
                ", supplierSpuId=" + supplierSpuId +
                ", supplierDeliveryType=" + supplierDeliveryType +
                ", supplierId=" + supplierId +
                ", measureUnit='" + measureUnit + '\'' +
                ", supplierCategoryId=" + supplierCategoryId +
                ", skuChoiceStatus=" + skuChoiceStatus +
                ", isSynUpdate=" + isSynUpdate +
                ", nameChange=" + nameChange +
                ", imageChange=" + imageChange +
                ", sellingPointChange=" + sellingPointChange +
                ", videoChange=" + videoChange +
                ", measureUnitChange=" + measureUnitChange +
                ", brandChange=" + brandChange +
                ", detailChange=" + detailChange +
                ", spuCodeChange=" + spuCodeChange +
                ", detailList=" + detailList +
                ", partyCode='" + partyCode + '\'' +
                ", spuOrigin=" + spuOrigin +
                ", writeOffNum='" + writeOffNum + '\'' +
                ", writeOffMultipleCount=" + writeOffMultipleCount +
                ", writeOffTime=" + writeOffTime +
                ", writeOffStart=" + writeOffStart +
                ", writeOffEnd=" + writeOffEnd +
                '}';
    }
}
